/*
 *****************************************************************************
 * Copyright (C) 2005-2011 UC Mobile Limited. All Rights Reserved
 * File			: AutomatedSettingPage.m
 *
 * Description	: 常用自动化测试设置页面
 *
 * Author		: daijb@ucweb.com
 * History		:
 *			   Creation, 2014/03/14, daijb, Create the file
 ******************************************************************************
 **/
#if defined(UC_COMMON_AUTOMATED_TEST) || defined(UC_MONKEY_TEST)
#import "VerDefine.h"


#import "AutomatedActionsPage.h"
#import "AutomatedActionsDataProcessor.h"
#import "AutomatedActionsDataProvider.h"

@implementation AutomatedActionsPage

- (id)initWithTitle:(NSString *)title
{
    if (self = [super initWithTitle:title])
	{
        self.dataProvider = [[[AutomatedActionsDataProvider alloc] init] autorelease];
        self.dataProcessor = [[[AutomatedActionsDataProcessor alloc] init] autorelease];
        self.dataProcessor.delegate = self;
    }
    
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    UIBarButtonItem* buttonItem = [[[UIBarButtonItem alloc] initWithTitle:resGetText(@"CommonAutomatedTest/Title") style:UIBarButtonItemStylePlain target:self action:@selector(backToRootViewController)] autorelease];
    buttonItem.accessibilityLabel = @"backToMainPage";
    self.navigationItem.leftBarButtonItem = buttonItem;
}

#pragma mark - back

- (void)backToRootViewController
{
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)dismissWithAnimatin:(BOOL)animated completion:(void(^)(void))completion;
{
    [self dismissViewControllerAnimated:YES completion:completion];
}

@end
#endif
